{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3398
  Verdict: Accepted
}
uses SysUtils, Math;
var i,n,mina,maxa:longint; r,c1,c2,l,res:double; a,b:array[0..100010] of longint;
function count(t:double):double;
var mn,mx,c:double; i:longint;
begin
mn:=1e9;
mx:=0;
for i:=1 to n do begin
    c:=a[i]+t*b[i];
    if c>mx then mx:=c;
    if c<mn then mn:=c;
end;
result:=abs(mx-mn);
end;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(n);
res:=maxlongint/1;
mina:=1;
maxa:=1;
for i:=1 to n do begin
    read(a[i],b[i]);
    if a[i]<a[mina] then mina:=i;
    if a[i]>a[maxa] then maxa:=i;
end;
l:=0;
r:=round(1e7);
res:=abs(a[maxa]-a[mina]);
for i:=1 to 200 do begin
    c1:=l+(r-l)/3;
    c2:=r-(r-l)/3;
    if count(c1)>count(c2) then l:=c1 else r:=c2;
end;
res:=min(res,(l+r)/2);
write(res:0:6,' ',count(res):0:6);
end.